home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5241 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: open vs fopen?
  5. Date: 9 Feb 1996 04:38:23 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4fej3v$lv4@gail.ripco.com>
  8. NNTP-Posting-Host: golden.ripco.com
  9.  
  10. sherlock@micronet.fr in <4f8qbg$549@chleuasme.francenet.fr> wrote:
  11.  
  12.  
  13. >because files opened using open and DOS files handles can be read and
  14. >write at the same time, while stdio files can't.
  15.  
  16. Don't post merde as "answers."
  17.  
  18. Assuming that you meant "without closing" instead of "at the same time,"
  19. since most disk drives don't provide for simultaneous reading and
  20. writing:
  21.  
  22. Open your manual and check the fopen modes "r+","w+", and "a+".
  23. Hint: the '+' indicates "for update".
  24.  
  25. If you were right, there are a lot of developers who need to know the
  26. source of your information.  A non-commercial example (freely available)
  27. is the large persistant hashfile that GNU-chess uses.
  28.  
  29. >suppose you have a database file, with fixed length fields.
  30. >low level functions(open...) enable the writing of some records and
  31. >the reading of other without closing the file.
  32.  
  33. And so do the fopen modes for updating.  Since there is no factual
  34. basis for your assertion that "stdio files" are inappropriate for such
  35. use, one must wonder where and why you picked this "information".
  36.  
  37.                                                                                                
  38. --
  39. * Martin Ambuhl       net: mambuhl@ripco.com
  40. * Chicago, IL (USA)    
  41.